#include <jni.h>

//
// Created by kevin on 2024-07-30.
//
#include <android/log.h>
#include <jni.h>
#include <android/native_window.h>
extern "C" {
#include "libavcodec/avcodec.h"
}

#define LOG_TAG "JYYPlayer"
#define LOGD(...) __android_log_print(ANDROID_LOG_DEBUG, LOG_TAG, __VA_ARGS__)
#define LOGI(...) __android_log_print(ANDROID_LOG_INFO, LOG_TAG, __VA_ARGS__)
#define LOGW(...) __android_log_print(ANDROID_LOG_WARN, LOG_TAG, __VA_ARGS__)
#define LOGE(...) __android_log_print(ANDROID_LOG_ERROR, LOG_TAG, __VA_ARGS__)
#define LOGV(...) __android_log_print(ANDROID_LOG_VERBOSE, LOG_TAG, __VA_ARGS__)

extern "C"
JNIEXPORT void JNICALL
Java_com_jyy_jyyplayer_JYYPlayer_native_1start(JNIEnv *env, jobject thiz, jobject surface) {
    
}
extern "C"
JNIEXPORT jstring JNICALL
Java_com_jyy_jyyplayer_JYYPlayer_test(JNIEnv *env, jobject thiz) {
    unsigned int version = avcodec_version();
    LOGD("version: %d", version);
    return env->NewStringUTF("hello world!");
}